
package dateDype.instanceOF;

import java.io.IOException;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class arrLst {
    
     public static void main(String[] args) throws IOException{
         
         Set<Object> setObject = new HashSet<Object>();
         
         try {
                setObject.add("JUAN"); setObject.add("CARLOS"); setObject.add("AÑEZ"); setObject.add("MEJIAS");
                setObject.add("JOHANNA"); setObject.add("JOSE"); setObject.add("MARIA"); setObject.add("ZABALA");
         } catch (Exception e) {
             System.err.println("ERROR: Debido a index");
         }         
         
         Iterator iterable = setObject.iterator();
         
         while (iterable.hasNext()) {
             Object object = iterable.next();  
             System.out.println(object.toString());
         }
    }
        
}